﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Code</title>
    <script src="~/Scripts/jquery-1.10.2.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#createCode").click(function () {
                var strData = $("#strData").val();
                var level = $("#level").val();
                var encoding = $("#encoding").val();
                var version = $("#version").val();
                var scale = $("#scale").val();

                $.post("/home/CreateCode_Choose", { strData: strData, level: level, qrEncoding: encoding, version: version, scale: scale }, function (data) {
                    $("img").attr("src", data);
                });
            });

        });

    </script>
</head>
<body>
    <div>

        <p>要生成的文字(支持中文)：<input id="strData" type="text" value="123456 测试" /></p>
        <p>
            Encoding:<select id="encoding">
                <option value="Byte">Byte</option>
                <option value="AlphaNumeric">AlphaNumeric</option>
                <option value="Numeric">Numeric</option>
            </select>

        </p>
        <p>
            Correction Level:<select id="level">
                <option value="M">M</option>
                <option value="L">L</option>
                <option value="Q">Q</option>
                <option value="H">H</option>
            </select>
        </p>
        <p>Version:<input id="version" type="text" value="8" /></p>
        <p>scale:<input id="scale" type="text" value="4" /></p>
        <img src="" alt="" />
        <input id="createCode" type="button" value="生成" />
    </div>
</body>
</html>
